Improve navicache smartnames.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 21 Jul 2011 21:49:51 +0000 (21:49 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 21 Jul 2011 21:49:51 +0000 (21:49 +0000)
gpsbabel/navicache.c

index 3d7936a94c9f16a927a7ffa7984474088642c324..dfc39e9c68feb1b9f02375bb05c1ef1b43c62d04 100644 (file)
@@ -125,8 +125,8 @@ nav_start(void *data, const XML_Char *xml_el, const XML_Char **xml_attr)
                        if (0 == strcmp(ap[0], "cache_id")) {
                                int id;
 
-                               wpt_tmp->shortname = xstrdup(ap[1]);
                                id = atoi(ap[1]);
+                               xasprintf(&wpt_tmp->shortname, "N%05X", id);
                                xasprintf(&wpt_tmp->url, "%s%d", NC_URL, id);
                        } else
                        if (0 == strcmp(ap[0], "name")) {